<template>
    <div>
        <h3>Toast演示组件</h3>
        <el-button type="success" @click="success">成功按钮</el-button>
        <el-button type="warning" @click="warning">警告按钮</el-button>
        <el-button type="danger" @click="danger">危险按钮</el-button>
    </div>
</template>

<script>
export default {
  name: "Toast",
  data() {
    return {}
  },
  methods: {
    // 调用成功弹窗
    success() {
      this.$toast({
        message: '成功提示',
        type: 'success'
      })
    },

    // 调用警告弹窗
    warning() {
      this.$toast({
        message: '警告窗口',
        type: 'warning'
      })
    },

    // 调用危险弹窗
    danger() {
      this.$toast({
        message: '危险窗口',
        type: 'fail'
      })
    },
  },
  created() {
  },
  beforeDestroy() {
  }
}
</script>

<style scoped>

</style>
